<?php if($MODE == "ENQ"){?>
<div class='span12'>
    <!-- HEADER -->
    <div class='row-fluid'>
        <div class='span12'>
            <div class='page-header'>

                <h1 class="span8">
                    <i class='icon-bullhorn'></i>
                    <span>REPORTS MANAGEMENT</span>
                </h1>
            </div>
        </div>
    </div>

    <!-- END OF HEADER -->


    <div class='row-fluid'>
        <div class="span12 box bordered-box blue-border" style="margin-bottom:0;">
            <div class="box-header blue-background">
                <div class="title">List of Reports</div>
                <div class="actions">
                    <a href="#" class="btn box-remove btn-mini btn-link"><i class="icon-remove"></i>
                    </a>
                    <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                    </a>
                </div>
            </div>
            <div class="box-content box-no-padding">
                        <table class="table table-bordered table-striped" >
                            <?php if($reports){?>
                                <thead>
                                <tr>
                                    <th>
                                        Business Name
                                    </th>
                                    <th>
                                        Report Type
                                    </th>
                                    <th>
                                       Description 
                                    </th>
                                    <th>
                                    Action
                                    </th>
                                   
                                </tr>
                                </thead>
                                <tbody>
									
                                <?php foreach($reports as $reports):?>
                                
                                
                                    <tr>

                                        <td><strong><span class="text text-error"><?= Post::where('id','=',$reports->post_id)->first()->title;?></span></strong>
                                       <div>
                                        <small class="text"><b>Posted On :</b> <?= $reports->created_on;?></small>
                                       </div>
                                       <div>
                                        <small class="text">  <b>By :</b> <?= $reports->name;?></small>
                                        </div>
                                        </td>
                                        <td>
                                        <?php if($reports->type == "ENQ") echo "Send Enquiry";?>
                                        <?php if($reports->type == "CLAIM") echo "Claim Report";?>
                                      
                                        </td>
                                        <td class="span6">
                                         <div>
                                       <?php if($reports->title){?> <small class="text text-error"><b> <?= $reports->title;?></b></small><?php }?>
                                       </div>
                                         <small class="text"><?= Str::limit($reports->description,150);?></small>
                                        </td>
                                        <td>
                                         <a href="<?= URL::to('admin/reports/edit/'.$reports->id);?>" title="View Report" class="btn btn-info btn-mini"><i class="icon-eye-open"></i></a>
                                        <a href="<?= URL::to('admin/reports/delete/'.$reports->id);?>" title="Delete Report" class="btn btn-danger btn-mini" <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>><i class="icon-trash"></i></a>
                                        </td>
                                        
                                       
                                       </tr>

                                <?php endforeach;?>



                                </tbody>
                            <?php }else{?>
                                <div class="alert alert-error">No data found..</div>
                            <?php }?>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    
<?php }?>

<?php if($MODE == "INC"){?>
<div class='span12'>
    <!-- HEADER -->
    <div class='row-fluid'>
        <div class='span12'>
            <div class='page-header'>

                <h1 class="span8">
                    <i class='icon-bullhorn'></i>
                    <span>REPORTS MANAGEMENT</span>
                </h1>
            </div>
        </div>
    </div>

    <!-- END OF HEADER -->


    <div class='row-fluid'>
        <div class="span12 box bordered-box blue-border" style="margin-bottom:0;">
            <div class="box-header blue-background">
                <div class="title">List of Reports</div>
                <div class="actions">
                    <a href="#" class="btn box-remove btn-mini btn-link"><i class="icon-remove"></i>
                    </a>
                    <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                    </a>
                </div>
            </div>
            <div class="box-content box-no-padding">
                        <table class="table table-bordered table-striped" >
                            <?php if($increports){?>
                                <thead>
                                <tr>
                                    <th>
                                        Business Name
                                    </th>
                                    <th>
                                       Description 
                                    </th>
                                   <th>
                                    Action 
                                    </th>
                                   
                                </tr>
                                </thead>
                                <tbody>

                                <?php foreach($increports as $reports):?>
                                
                                
                                    <tr>

                                        <td><strong><span class="text text-error"><?= Post::where('id','=',$reports->post_id)->first()->title;?></span></strong>
                                       <div>
                                        <small class="text"><b>Posted On :</b> <?= $reports->created_on;?></small>
                                       </div>
                                       <div>
                                        <small class="text">  <b>By :</b> <?= $reports->name;?></small>
                                        </div>
                                        </td>
                                        <td class="span10">
                                         <div>
                                       <?php if($reports->title){?> <small class="text text-error"><b> <?= $reports->title;?></b></small><?php }?>
                                       </div>
                                         <small class="text"><?= Str::limit($reports->description,150);?></small>
                                        </td>
                                        <td>
                                         <a href="<?= URL::to('admin/reports/edit/'.$reports->id);?>" title="View Report" class="btn btn-info btn-mini"><i class="icon-eye-open"></i></a>
                                        <a href="<?= URL::to('admin/reports/delete/'.$reports->id);?>" title="Delete Report" class="btn btn-danger btn-mini"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>><i class="icon-trash"></i></a>
                                        </td>
                                        
                                       
                                       </tr>

                                <?php endforeach;?>



                                </tbody>
                            <?php }else{?>
                                <div class="alert alert-error">No data found..</div>
                            <?php }?>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    
<?php }?>

<?php if($MODE == "VIEW"){?>

<div class='span12'>
    <!-- HEADER -->
    <div class='row-fluid'>
        <div class='span12'>
            <div class='page-header'>

                <h1 class="span8">
                    <i class='icon-bullhorn'></i>
                    <span>REPORTS MANAGEMENT</span>
                </h1>
                
                
            </div>
        </div>
    </div>

    <!-- END OF HEADER -->


    <div class='row-fluid'>
        <div class="span12 box bordered-box blue-border" style="margin-bottom:0;">
            <div class="box-header blue-background">
                <div class="title">Reports</div>
                <div class="actions">
                    <a href="#" class="btn box-remove btn-mini btn-link"><i class="icon-remove"></i>
                    </a>
                    <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                    </a>
                </div>
            </div>
            <div class="box-content">
                
                <?php if(Session::get('message')) {?>
                <p>
                    <span class="text-danger"> <?php echo Session::get('message');?></span>
                </p>
                <?php }?>
               <h3>Report Type : <?php if($report->type == 'INQ') echo "Incorrect Report" ;?>
               <?php if($report->type == 'ENQ') echo "Send Enquiry" ;?>
			   <?php if($report->type == 'CLAIM') echo "Claim Report" ;?>
               </h3>
                <hr class="hr-normal">
                    <div class="control-group">
                        <label class="control-label" >Full Name</label>
                        <div class="controls">
                            <input class="input-xlarge" placeholder="Category" type="text"  name="name" value="<?= $report->name;?>" readonly>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label" >Email</label>
                        <div class="controls">
                            <input class="input-xlarge" placeholder="Category" type="text"  name="name" value="<?= $report->email;?>" readonly>
                        </div>
                    </div>
                    
                    <div class="control-group">
                        <label class="control-label" >Contact No</label>
                        <div class="controls">
                            <input class="input-xlarge" placeholder="Category" type="text"  name="name" value="<?= $report->contact;?>" readonly>
                        </div>
                    </div>
                    
                    <div class="control-group">
                        <label class="control-label" >Location</label>
                        <div class="controls">
                            <input class="input-xlarge" placeholder="Category" type="text"  name="name" value="<?= $report->location;?>" readonly>
                        </div>
                    </div>
                    
                    <div class="control-group">
                        <label class="control-label" >Description <span class="text text-error">*</span></label>
                        <div class="controls">
                            <textarea class="input-xxlarge" placeholder="comment"  name="comment" readonly rows="7"><?= $report->description?></textarea>
                        </div>
                    </div>

                    <hr class="hr-normal">

                    
            </div>
        </div>
    </div>


    <!-- END OF CONTENT -->
</div>



<?php }?>





